package com.acwing.partition13;

import java.io.*;
import java.util.Arrays;

/**
 * @author `RKC`
 * @date 2022/3/4 23:00
 */
public class AC1246等差数列 {

    private static final int N = 100010;
    private static int[] nums = new int[N];
    private static int n;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        n = Integer.parseInt(reader.readLine());
        String[] ss = reader.readLine().split(" ");
        for (int i = 0; i < n; i++) nums[i] = Integer.parseInt(ss[i]);
        Arrays.sort(nums, 0, n);
        int d = 0, ans = n;
        for (int i = 1; i < n; i++) d = gcd(d, nums[i] - nums[0]);
        if (d != 0) ans = (nums[n - 1] - nums[0]) / d + 1;
        writer.write(ans + "\n");
        writer.flush();
    }

    private static int gcd(int a, int b) {
        return b != 0 ? gcd(b, a % b) : a;
    }
}
